﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceCS.DesignPattern.Core.StrategyPattern.ShopStrategy
{
    /// <summary>
    /// 打折策略
    /// </summary>
    public class CashRebate : CashBase
    {
        private decimal _moneyRebate;
        public CashRebate(decimal moneyRebate)
        {
            _moneyRebate = moneyRebate;
        }
        public override decimal AcceptCash(decimal money)
        {
            return money * _moneyRebate;
        }
    }
}
